#pragma once
#include "C_Widget.h"

namespace gui
{
	class C_PushButton :
		public C_Widget
	{
	private:
		std::function<void()> m_buttonCommand;
	public:
		C_PushButton();
		virtual ~C_PushButton();

		/////////////////////////////////////////////////////////////////////////////////////////
		////////////////	SET AND DO COMMAND
		void setCommand(std::function<void()> cmd) { m_buttonCommand = cmd; }
		void doCommand() { m_buttonCommand(); }

		/////////////////////////////////////////////////////////////////////////////////////////
		////////////////	EVENTS FUNCTIONS
		virtual void onClickButton(sf::Mouse::Button b_type);
		virtual void renderWidget(); //for render contents

		virtual void renderOver();
		virtual void renderOut();
		virtual void renderPress();
		virtual void renderClick();
	};
}

